package com.swanclouds.redfish.managers.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.DeviceEntity;

/**
 * @author 李文强
 * description
 */

public class LldPServiceModel implements DeviceEntity {

    /**
     * 字符串	LLDP信息的OData描述信息
    */
    @JsonProperty("@odata.context")
     private String context;

    /**
     * 字符串LLDP信息的访问路径
     */
    @JsonProperty("@odata.id")
    private String dataId;

    /**
     * 字符串LLDP信息的名称
     */
    @JsonProperty("Name")
    private String name;

    /**
     * 字符串LLDP服务资源的ID
     */
    @JsonProperty("Id")
    private String id;

    /**
     * 布尔	LLDP服务是否使能
     */
    @JsonProperty("LldpEnabled")
    private Boolean lldpEnabled;

    /**
     * 字符串	LLDP服务工作模式
     */
    @JsonProperty("WorkMode")
    private String workMode;


    @Override
    public String getDataId() {
        return dataId;
    }

    @Override
    public String getContext() {
        return context;
    }

    @Override
    public String getType() {
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getName() {
        return name;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public void setDataId(String dataId) {
        this.dataId = dataId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Boolean getLldpEnabled() {
        return lldpEnabled;
    }

    public void setLldpEnabled(Boolean lldpEnabled) {
        this.lldpEnabled = lldpEnabled;
    }

    public String getWorkMode() {
        return workMode;
    }

    public void setWorkMode(String workMode) {
        this.workMode = workMode;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "LldPServiceModel{" +
                "context='" + context + '\'' +
                ", dataId='" + dataId + '\'' +
                ", name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", lldpEnabled=" + lldpEnabled +
                ", workMode='" + workMode + '\'' +
                '}';
    }
}
